Fitting apparatus

ABSTRACT

A fitting apparatus includes a robot arm having, at the forward end thereof, a gripper for holding a workpiece, a force detector for detecting a force and moment received by the workpiece held by the gripper, and a controller for controlling an operation of the robot arm. The controller includes a motion command generating unit for generating an operation command to fit two workpieces to each other, and an operation command correcting unit for correcting the operation command so as to correct the position of the gripper in a direction perpendicular to the fitting direction and the orientation of the gripper around an axis perpendicular to the fitting direction until the detected force and moment become less than or equal to a threshold value, based on either maximum values of the force and moment detected by the force detector while the two workpieces are in contact with each other or the force and moment detected by the force detector when the two workpieces first come into contact with each other.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a fitting apparatus for fitting two workpieces to each other using a robot while performing compliance control or force control.

2. Description of the Related Art

In carrying out assembly using a robot, it is required to position a workpiece in place on a table while at the same time moving another workpiece accurately to the place with the robot. However, between the workpiece held by the robot and the workpiece fixed to the table, there exists a position error and an orientation error, which sometimes adversely affects assembly, or especially, the fitting of the two workpieces by the robot. In order to solve this problem, a fitting apparatus for fitting two workpieces to each other generally uses a RCC (remote center compliance) mechanism in which a spring or a damper is interposed between the robot arm and the robot gripper to thereby provide a mechanically elastic motion of the gripper mounted at the forward end of the robot arm, so that one workpiece held in the gripper can be fitted smoothly with the other workpiece by automatically changing the position and the orientation of the one workpiece held in the gripper even in the presence of some position error or orientation error. Further, as described in Japanese Examined Patent Publication No. 4-43744, Japanese Examined Patent Publication No. 6-83976, Japanese Unexamined Patent Publication No. 5-38637 and Japanese Patent No. 2604929, a compliance control method or force control method can be used in which the robot is operated as if there exists a spring or a damper between the robot arm and the robot gripper by controlling the operation of the robot arm to thereby obtain the same effect as the RCC mechanism.

In the conventional compliance control or force control, one of the two workpieces to be fitted to each other is held by the gripper of the robot arm and pressed against the other workpiece to thereby carry out the fitting operation, while the force and moment exerting on the workpiece held by the gripper are detected and the operation of the robot arm is controlled and corrected so as to bring the detected force and moment to a target value. In correcting the operation of the robot arm for each control period, the difference between the detected force and the target force and the difference between the detected moment and the target moment are multiplied by a parameter called a force control gain to thereby calculate a command velocity and a command angular velocity for the robot arm. Based on the command velocity and the command angular velocity thus calculated, the workpiece held by the gripper is translated and rotated. Therefore, the force control gain exhibits the force control performance and a larger value of the force control gain can achieve a quicker correction of the position and orientation of the workpiece held by the gripper.

However, as the force control gain is increased, the vibration of the robot arm and the vibration due to the contact between the workpieces are liable to be amplified and the operation of the robot arm is easily oscillated. Therefore, in the conventional compliance control or force control, the force control gain can be increased only to a value determined by the oscillation limit, and in the system having an initial error in the position and orientation of the workpieces and the robot arm, the error correction requires a vast amount of time.

SUMMARY OF THE INVENTION

Accordingly, it is an object of the present invention to provide a fitting apparatus using the compliance control or force control in which workpieces can be fitted to each other more quickly and more stably than in the prior art.

In order to achieve the object described above, according to the present invention, a fitting apparatus is provided which includes a robot arm having, at the forward end thereof, a gripper for holding a workpiece, a force detector for detecting a force and moment received by the workpiece held by the gripper, and a controller for controlling an operation of the robot arm, the gripper holding one of two workpieces to be fitted to each other and moving the workpiece in a fitting direction to be fitted to the other of the two workpieces while compliance control or force control is performed so as to correct a position and orientation of the workpiece held by the gripper based on an output of the force detector, wherein the controller includes an operation command generating unit for generating an operation command to fit the two workpieces to each other, and an operation command correcting unit for correcting the operation command generated by the operation command generating unit so as to correct the position of the gripper in a direction perpendicular to the fitting direction and the orientation of the gripper around an axis perpendicular to the fitting direction until the force and moment detected by the force detector become less than or equal to a predetermined threshold value, based on either maximum value of the force and moment detected by the force detector while the two workpieces are in contact with each other or the force and moment detected by the force detector when the two workpieces first come into contact with each other, the controller controlling the operation of the robot arm to fit the two workpieces to each other in accordance with the corrected operation command.

In the fitting apparatus according to the present invention, the operation command for the robot arm is corrected, in every control cycle of the controller, based on either maximum value of the force and moment detected by the force detector while the two workpieces are in contact with each other or the force and moment detected by the force detector when the two workpieces first come into contact with each other, and the position of the gripper and workpiece in the direction perpendicular to the fitting direction and the orientation of the gripper and workpiece around the axis perpendicular to the fitting direction are corrected until the force and moment detected by the force detector are reduced to or less than the predetermined threshold value. The force and moment of the workpiece held by the gripper are detected in every control cycle, and the force and moment thus detected are used only for monitoring whether or not they are reduced to or less than the predetermined threshold value. Therefore, even if the force detection means is accompanied by noises due to the vibration of the robot arm or workpiece, the correcting operation is not substantially affected, and the force control gain can be set to a larger value than that in the prior art.

In the fitting apparatus described above, the operation command correcting unit preferably corrects the operation command so as to reduce the force and moment detected by the force detector. For example, the force detector detects the forces exerting in the directions along two axes perpendicular to the fitting direction and perpendicular to each other, and the operation command correcting unit corrects the operation command based on the forces in the directions along the two axes detected by the force detector to thereby correct the position of the gripper in the directions perpendicular to the fitting direction. The force detector detects the moments around the two axes perpendicular to the fitting direction and perpendicular to each other, and the operation command correcting unit corrects the operation command based on the moments around the two axes detected by the force detector to thereby correct the orientation of the gripper around the axes perpendicular to the fitting direction.

The operation command correcting unit preferably corrects the operation command until the force and moment detected by the force detector are reduced to zero.

The force detector can be a force sensor.

The force detector may determine the force and moment received by the workpiece, based on a current value of an actuator for driving the robot arm.

In the preset application, the term “force control gain” is a constant defined by the following equation.

Force control gain for force=command velocity (m/s)/(detected force−target force)(Kgf)

Force control gain for moment=command angular velocity (rad/s)/(detected moment−target moment)(Kgfm)

According to the present invention, even if the force detection means is accompanied by noises due to the vibration of the robot arm or workpiece, the correcting operation is not affected, and a force control gain can be set to a larger value than that in the prior art, thereby making it possible to correct an initial error, if any in the workpieces or the robot arm, quicker than in the prior art. As a result, quick, stable fitting operation can be carried out.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other objects, features and advantages of the present invention will be described in more detail below based on preferred embodiments of the present invention with reference to the accompanying drawings, in which:

FIG. 1 is a perspective view showing a general configuration of a fitting apparatus according to the present invention;

FIG. 2 is a function block diagram of the fitting apparatus according to the present invention;

FIG. 3 is a flowchart showing steps of the fitting operation by the fitting apparatus shown in FIGS. 1 and 2;

FIGS. 4A to 4D are diagrams showing the steps of the fitting operation by the fitting apparatus shown in FIGS. 1 and 2;

FIG. 5 is a flowchart showing steps of the fitting operation by the fitting apparatus shown in FIGS. 1 and 2 according to another embodiment;

FIGS. 6A and 6B are graphs showing a temporal change of a moment received by a workpiece and a orientation of the workpiece under conventional compliance control or force control; and

FIGS. 7A and 7B are graphs showing a temporal change of a moment received by a workpiece and an orientation of the workpiece under compliance control or force control employed by the fitting apparatus according to the present invention.

DETAILED DESCRIPTION

The preferred embodiments of the present invention will be described below with reference to the accompanying drawings.

First, a general configuration of a fitting apparatus 10 according to the present invention will be explained with reference to FIG. 1.

The fitting apparatus 10 includes a robot arm 12 adapted to be able to move around a plurality of axes, a force detector 14 for detecting a force and a moment, a controller 16 for controlling an operation of robot arm 12, and a table 18 for mounting a workpiece W1 thereon. A gripper 20 adapted to be able to hold and release a workpiece W2 is provided at the forward end of robot arm 12. A clamp unit 22 for fixing workpiece W1 is provided on table 18, so that workpiece W1 to be fitted to workpiece W2 held by gripper 20 can be fixed removably to table 18.

Force detector 14 is mounted on the wrist of robot arm 12 so that force F and moment M received by workpiece W2 held by gripper 20 can be detected. For example, force detector 14 can be a 6-axis force sensor, which is mounted between the forward end of robot arm 12 and gripper 20 and adapted to be able to detect forces in directions along three orthogonal axes and moments around three orthogonal axes. However, force detector 14 is not limited to the 6-axis force sensor, but may be any device for estimating the force and the moment received by workpiece W2 held by gripper 20, based on a current value of an actuator (not shown) such as a motor for driving robot arm 12.

Workpieces W1, W2 to be fitted to each other may be constituted, for example, by a workpiece W2 having a cylindrical protrusion 24 and a workpiece W1 formed with a cylindrical fitting hole 26 mating with cylindrical protrusion 24. In fitting apparatus 10 shown in FIG. 1, workpiece W2 having protrusion 24 is held by gripper 20 and moved in the fitting direction parallel to a center axis 28 of fitting hole 26 with protrusion 24 aligned with center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18, so that protrusion 24 of workpiece 2 is inserted into fitting hole 26 of workpiece W1 to thereby fit two workpieces W1, W2 to each other.

FIG. 2 is a function block diagram of fitting apparatus 10 according to the present invention, showing the detail of control unit 16 used in fitting apparatus 10.

Controller 16, as shown in FIG. 2, includes an operation command generating unit 30 for generating an operation command for robot arm 12 and gripper 20, and an operation command correcting unit 32 for correcting, under predetermined conditions, the operation command generated by operation command generating unit 30. Operation command generating unit 30, in accordance with a program input in advance or the like, generates operation commands, specifically a velocity command and an angular velocity command, for robot arm 12 and gripper 20 thereof so as to make gripper 20 hold one workpiece W2 included in two workpieces W1, W2 to be fitted to each other at a predetermined place and fit it to the other workpiece W1 fixed at a predetermined place on table 18. Operation command correcting unit 32 is configured of a force control gain unit 34 and a force and moment holding unit 36.

Force and moment holding unit 36 is implemented by a storage unit such as a RAM and adapted to store or hold maximum values F′, M′ of force F and moment M detected by force detector 14 while workpiece W2 held by gripper 20 and workpiece W1 fixed to table 18 are in contact with each other, and values F0, M0 of force F and moment M detected by force detector 14 when workpiece W2 held by gripper 20 and workpiece W1 fixed to table 18 first come into contact with each other. Force control gain unit 34, upon input of the difference between forces F′, F0 and moments M′, M0 held in force and moment holding unit 36 and a target force Fd and a target moment Md to be detected by force detector 14 when workpieces W1, W2 are fitted to each other, multiplies the input by a force control gain G to thereby output a velocity command correction amount υc and an angular velocity command correction amount ωc for causing robot arm 12 and gripper 20 to perform the motion required to make force F and moment M detected by force detector 14 approach target force Fd and target moment Md, respectively.

Operation command correcting unit 32 corrects velocity command υ and angular velocity command ω by adding velocity command correction amount υc and angular velocity command correction amount ωc output from force control gain unit 34 to velocity command υ and angular velocity command ω generated by operation command generating unit 30, respectively, and causes robot arm 12 and gripper 20 thereof to move based on corrected velocity command υ′ and corrected angular velocity command ω′. The correction of the operation commands by operation command correcting unit 32 is continued until force F and moment M detected by force detector 14 are reduced to less than or equal to predetermined threshold values TF, TM, respectively.

Next, the operation of fitting apparatus 10 shown in FIGS. 1 and 2 will be described with reference to FIGS. 3 to 5. In the following description, a Z-axis represents a direction of center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18, and X- and Y-axes represent directions perpendicular to each other in a plane perpendicular to the Z-axis.

First, one workpiece W1 included in workpiece pair W1, W2 to be fitted to each other is fixed at a predetermined place on table 18 by the operator or another robot. In accordance with the operation command generated by operation command generating unit 30 based on a predetermined program or the like, robot arm 12 holds, by gripper 20 thereof, mating workpiece W2 arranged at a predetermined place, and moves workpiece W2 to a place in opposed relation to workpiece W1 fixed to table 18 so as to align the axis of protrusion 24 of workpiece W2 held by gripper 20 with center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18. Robot arm 12 further moves workpiece W2 in the fitting direction (i.e. Z-axis direction) parallel to center axis 28 of fitting hole 26 of workpiece W1 to contact it with workpiece W1 on table 18 (step S100). Please note that the operation commands include a velocity command υ(υ_(x), υ_(y), υ_(z)) for translating gripper 20 along the directions of the X-, Y- and Z-axes and an angular velocity command ω(ω_(W), ω_(P), ω_(R)) for rotating gripper 20 around the X-, Y- and Z-axes and that the components of velocity command υ and angular velocity command ω other than the fitting direction component of the velocity command become zero, i.e. υ_(x)=0, υ_(y)=0, ω_(W)=0, ω_(P)=0 and ω_(R)=0.

In the case where workpiece W1 and workpiece W2 are arranged such that center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18 is accurately aligned with the axis of protrusion 24 of workpiece W2 held by gripper, 20, protrusion 24 of workpiece W2 will be smoothly inserted into fitting hole 26 of workpiece W1. Specifically, the components of force F(F_(X), F_(Y), F_(Z)) and moment M(M_(X), M_(Y), M_(Z)) exerting on workpiece W2 during the fitting operation other than the fitting direction component become zero (i.e. F_(X)=0, F_(Y)=0, M_(X)=0, M_(Y)=0, M_(Z)=0). Therefore, target Fd(Fd_(X), Fd_(Y), Fd_(Z)) and target moment Md(Md_(X), Md_(Y), Md_(Z)) to be exerted on workpiece W2 during the fitting operation are determined so that all the components of target force Fd (Fd_(X), Fd_(Y), Fd_(Z)) and target moment Md (Md_(X), Md_(Y), Md_(Z)) other than the fitting direction component become zero (i.e. Fd_(X)=0, Fd_(Y)=0, Md_(X)=0, Md_(Y)=0, Md_(Z)=0).

However, position and orientation errors occur when workpiece W1 is fixed to table 18 and workpiece W2 is held by gripper 20, and the fitting operation is often performed while center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18 is not accurately aligned with the axis of protrusion 24 of workpiece W2 held by gripper 20. When workpiece W2 held by gripper 20 comes into contact with workpiece W1 fixed to table 18 in such a case, some force F and moment M exert on workpiece W2 held by gripper 20 (step S102). For example, in the case where, as shown in FIG. 4A, axis 38 of protrusion 24 of workpiece W2 held by gripper 20 is inclined with respect to center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18, when two workpieces W1, W2 come into contact with each other, forces F_(X) and F_(Y) in the directions perpendicular to the fitting direction and moments M_(X), M_(Y) around the axes perpendicular to the fitting direction exert on workpiece W2 held by gripper 20, as shown in FIG. 4B. Once force detector 14 detects force F and moment M received by workpiece W2, controller 16 controls the operation of robot arm 12 and gripper 20 such that force F and moment M detected by force detector 14 approach target force Fd and target moment Md, respectively.

In fitting apparatus 10 according to the present invention, the maximum values of force F(F_(X), F_(Y), F_(Z)) and moment M(M_(X), M_(Y), M_(Z)) detected by force detector 14 while workpiece W1 fixed to table 18 and workpiece W2 held by gripper 20 are in contact with each other are stored or held in force and moment holding unit 36. In every control cycle, force and moment holding unit 36 compares the components of force F(F_(X), F_(Y), F_(Z)) and moment M(M_(X), M_(Y), M_(Z)) detected by force detector 14 with the corresponding components of force F′(F′_(X), F′_(Y), F′_(Z)) and moment M′(M′_(X), M′_(Y), M′_(Z)) stored or held in force and moment holding unit 36. When any component of force F(F_(X), F_(Y), F_(Z)) and moment M(M_(X), M_(Y), M_(Z)) detected by force detector 14 is larger than the corresponding component of force F′(F′_(X), F′_(Y), F′_(Z)) and moment M′(M′_(X), M′_(Y), M′_(Z)) stored or held at that time in force and moment holding unit 36, the stored or held value of the component of force F′(F′_(X), F′_(Y), F′_(Z)) and moment M′(M′_(X), M′_(Y), M′_(Z)) is updated to the value of the corresponding component of force F(F_(X), F_(Y), F_(Z)) and moment M(M_(X), M_(Y), M_(Z)) detected by force detector 14, and stored or held.

Regarding Z-axis velocity command υ_(Z), like in the conventional compliance control or force control, operation command correcting unit 32 multiplies the difference between Z-axis force F_(Z) detected by force detector 14 and Z-axis target force Fd_(Z) by force control gain G_(Z) to thereby calculate a velocity command correction value υc_(Z), and adds calculated velocity command correction value υc_(Z) to Z-axis velocity command υ_(Z) generated by operation command generating unit 30 to thereby correct Z-axis velocity command υ_(Z). Specifically, in accordance with following equation (1), a corrected Z-axis velocity command υ′_(Z) is determined.

υ′_(Z)=(F _(Z) −Fd _(Z))×G _(Z)+υ_(Z)   (1)

On the other hand, protrusion 24 of workpiece W2 and fitting hole 26 of workpiece W1 are cylindrical and the rotation around Z-axis is meaningless. Therefore, angular velocity command ω_(R) around Z-axis and corrected angular velocity ω′_(R) around Z-axis are not required to be determined. However, in the case where protrusion 24 of workpiece W2 and fitting hole 26 of workpiece W1 are not cylindrical, like in the conventional compliance control or force control, corrected angular velocity ω′_(R) around Z-axis is determined according to the following equation.

ω′_(R)=(M _(Z) −Md _(Z))×G _(R)+ω_(R)

where G_(R) is the force control gain for the moment around Z-axis.

Regarding X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P), operation command correcting unit 32 multiplies the difference between maximum values F′, M′ of the force and moment stored or held in force and moment holding unit 36 and target force Fd and target moment Md by force control gain G to thereby calculate velocity command correction amounts υc_(X), υc_(Y) and angular velocity command correction amounts ω_(CW), ωc_(P), and adds calculated velocity command correction amounts υc_(X), υc_(Y) and angular velocity command correction amounts ω_(CW), ωc_(P) to X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P) generated by operation command generating unit 30, respectively, to thereby correct X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around X-axis ω_(P), respectively. Taking into consideration the fact that X-axis target force Fd_(X), Y-axis target force Fd_(Y), moment around X-axis Md_(X) and moment around Y-axis Md_(Y) are all zero, corrected X-axis velocity command υ′_(X), corrected Y-axis velocity command υ′_(Y), corrected angular velocity command around X-axis ω′_(W) and corrected angular velocity command around Y-axis ω′_(P) can be determined from following Equations (2) to (5).

υ′_(X)=(F′ _(X) −Fd _(X))×G _(X)+υ_(X) =F′ _(X) ×G _(X)   (2)

υ′_(Y)=(F′ _(Y) −Fd _(Y))×G _(Y)+υ_(Y) =F′ _(Y) ×G _(Y)   (3)

ω′_(W)=(M′ _(X) −Md _(X))×G _(W)+ω_(W) =M′ _(X) ×G _(W)   (4)

ω′_(P)=(M′ _(Y) −Md _(Y))×G _(P)+ω_(P) =M′ _(Y) ×G _(P)   (5)

where G_(X), G_(Y) represent the force control gain of the X-axis force and the force control gain of the Y-axis force, respectively, and G_(W), G_(P) represent the force control gain of the moment around X-axis and the force control gain of the moment around Y-axis, respectively.

The fitting operation is an operation of moving gripper 20 and workpiece W2 only in the fitting direction, i.e. along Z-axis, and in the fitting operation, X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P) are all zero. Therefore, operation command correction amounts υc_(X), υc_(Y), ωc_(W), ωc_(P) determined by operation command correcting unit 32 become corrected X-axis velocity command υ′_(X), corrected Y-axis velocity command υ′_(Y), corrected angular velocity command around X-axis ω′_(W) and corrected angular velocity command around Y-axis ω′_(P), respectively. Thus, operation command correcting unit 32 determines υ′_(X), υ′_(Y), ω′_(W), ω′_(P) as the X-axis velocity command, the Y-axis velocity command, the angular velocity commands around X-axis and the angular velocity command around Y-axis, respectively, by multiplying maximum values F′, M′ of the force and the moment stored or held in force and moment holding unit 36 by force control gain G.

Controller 16, as shown in FIG. 4C, operates robot arm 12 and gripper 20, based on corrected X-axis velocity command υ′_(X), corrected Y-axis velocity command υ′_(Y), corrected Z-axis velocity command υ′_(Z), corrected angular velocity command around X-axis ω′_(W) and corrected angular velocity command around Y-axis ω′_(P) thus determined, and corrects the position and orientation of gripper 20 and workpiece W2 (step S104).

Next, X- and Y-axis forces F_(X), F_(Y) and moments M_(X), M_(Y) around X- and Y-axes detected by force detector 14 are compared with predetermined threshold values TF_(X), TF_(Y), TM_(X), TM_(Y), respectively, in every control cycle, and if any of the former values is larger than a predetermined corresponding threshold value, the process of step S104 is repeated in every control cycle and the correction of the position and orientation of gripper 20 and workpiece W2 is continued until all of F_(X), F_(Y), M_(X), M_(Y) satisfy following Equation (6) (step S106).

F_(X)≦TF_(X)

F_(Y)≦TF_(Y)

M_(X)≦TM_(X)

M_(Y)≦TM_(Y)   (6)

where threshold values TF_(X), TF_(Y) are ones associated with X-axis force F_(X) and Y-axis force F_(Y) detected, respectively, and threshold values TM_(X), TM_(Y) are ones associated with moment M_(X) around X-axis and moment M_(Y) around Y-axis, respectively.

On the other hand, if all of forces F_(X), F_(Y) and moments M_(X), M_(Y) detected by force detector 14 become less than or equal to predetermined threshold values TF_(X), TF_(Y), TM_(X), TM_(Y), respectively, and Equation (6) comes to be satisfied, it is judged that the error correction of the position and orientation of gripper 20 and workpiece W2 has been completed (step S108). When the correction of the position and orientation of gripper 20 and workpiece W2 has been completed, axis 38 of protrusion 24 of workpiece W2 held by gripper 20 is aligned with center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18. Therefore, by moving gripper 20 and workpiece W2 in the fitting direction while keeping this position and orientation, protrusion 24 of workpiece W2 held by gripper 20 can be smoothly inserted into fitting hole 26 of workpiece W1 fixed to table 18, as shown in FIG. 4D, thereby completing the fitting operation (step S110).

In the description of the above-mentioned operation of fitting apparatus 10 according to the present invention, maximum values F′(F′_(X), F′_(Y), F′_(Z)) and M′(M′_(X), M′_(Y), M′_(Z)) of force F and moment M detected by force detector 14 while workpiece W1 and workpiece W2 are in contact-with each other are stored or held in force and moment holding unit 36. However, alternatively, force and moment holding unit 36 may store or hold force F0(F0 _(X), F0 _(Y), F0 _(Z)) and moment M0(M0 _(X), M0 _(Y), M0 _(Z)) detected by force detector 14 when workpieces W1 and W2 first come into contact with each other. When two workpieces W1, W2 are not in contact with each other, force F and moment M are substantially zero. Therefore, by detecting that components of force F(F_(X), F_(Y), F_(Z)) and moment M(M_(X), M_(Y), M_(Z)) detected by force detector 14 has exceeded a predetermined value, the contact between the two workpieces W1, W2 can be detected.

FIG. 5 shows operation steps in the case where, as described above, force F0 and moment M0 detected by force detector 14 when workpieces W1, W2 first come into contact with each other are stored or held in force and moment holding unit 36. The operation steps shown in FIG. 5 are different from those shown in FIG. 3 in that step S104 of the operation steps shown in FIG. 3 is replaced by step S112, while the other steps remain the same.

Once workpieces W1, W2 come into contact with each other in step S100 and force F and moment M are exerted on workpiece W2 held by gripper 20, force F and moment M exerted on workpiece W2 are detected by force detector 14 (step S102). Force and moment holding unit 36 stores and then continues to hold force F0(F0 _(X), F0 _(Y), F0 _(Z)) and moment M0(M0 _(X), M0 _(Y), M0 _(Z)) detected by force detector 14 when workpieces W1 and W2 first come into contact with each other.

Operation command correcting unit 32, as in step S104, corrects Z-axis velocity command υ_(Z) generated by operation command generating unit 30, based on the difference between Z-axis force F_(Z) detected by force detector 14 and Z-axis target force Fd_(Z), and determines corrected Z-axis velocity command υ′_(Z) in accordance with Equation (1). Rotation around Z-axis is meaningless because protrusion 24 of workpiece W2 and fitting hole 26 of workpiece W1 are cylindrical. Therefore, angular velocity command ω_(R) around Z-axis and corrected angular velocity ω′_(R) around Z-axis are not required to be determined. However, when protrusion 24 of workpiece W2 and fitting hole 26 of workpiece W1 are not cylindrical, corrected angular velocity ω′_(R) around Z-axis may be determined in the same way as in the steps shown in FIG. 3.

On the other hand, regarding X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P), operation command correcting unit 32 multiplies the difference between force F0 and moment M0 stored or held in force and moment holding unit 36 and target force Fd and target moment Md by force control gain G to thereby calculate operation command correction amounts υc_(X), υc_(Y), ωc_(W), ωc_(P), and adds operation command correction amounts υc_(X), υc_(Y), ωc_(W), ωc_(P) thus determined by the calculation to X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P) generated by operation command generating unit 30, respectively, to thereby correct X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P). Taking into consideration the fact that X- and Y-axis target forces Fd_(X), Fd_(Y) and moments Md_(X), Md_(Y) around X- and Y-axes are all zero, corrected X-axis velocity command υ′_(X), corrected Y-axis velocity command υ′_(Y), corrected angular velocity command around X-axis ω′_(W) and corrected angular velocity command around Y-axis ω′_(P) can be determined from following Equations (2′) to (5′).

υ′_(X)=(F0_(X) −Fd _(X))×G _(X)+υ_(X) =F0_(X) ×G _(X)   (2′)

υ′_(Y)=(F0_(Y) −Fd _(Y))×G _(Y)+υ_(Y) =F0_(Y) ×G _(Y)   (3′)

ω′_(W)=(M0_(X) −Md _(X))×G _(W)+ω_(W) =M0_(X) ×G _(W)   (4′)

ω′_(P)=(M0_(Y) −Md _(Y))×G _(P)+ω_(P) =M0_(Y) ×G _(P)   (5′)

where G_(X), G_(Y) represent a force control gain of the X-axis force and a force control gain of the Y-axis force, respectively, and G_(W), G_(P) represent a force control gain of the moment around X-axis and a force control gain of the moment around Y-axis, respectively.

Further, since X-axis velocity command υ_(X), Y-axis velocity command υ_(Y), angular velocity command around X-axis ω_(W) and angular velocity command around Y-axis ω_(P) are all zero, operation command correction amounts υc_(X), υc_(Y), ωc_(W), ωc_(P) determined by operation command correcting unit 32 are corrected X-axis velocity command υ′_(X), corrected Y-axis velocity command υ′_(Y), corrected angular velocity command around X-axis ω′_(W) and corrected angular velocity command around Y-axis ω′_(P), respectively. Therefore, it can be said that operation command correcting unit 32 multiplies force F0 and moment M0 stored or held in force and moment holding unit 36 by force control gain G to thereby determine υ′_(X), υ′_(Y), ω′_(W), ω′_(P) as X- and Y-axis velocity commands and angular velocity commands around X- and Y-axes, respectively.

Controller 16 operates robot arm 12 and gripper 20 thereof based on corrected X-axis velocity command υ′_(X), corrected Y-axis velocity command υ′_(Y), corrected angular velocity command around X-axis ω′_(W) and corrected angular velocity command around Y-axis ω′_(P) thus determined to thereby correct the position and orientation of gripper 20 and workpiece W2 (step S112).

Next, in every control cycle, force F and moment M received by workpiece W2 are detected by force detector 14, and X- and Y-axis forces F_(X), F_(Y) and moments around X- and Y-axes M_(X) and M_(Y) thus detected are compared with predetermined threshold values TF_(X), TF_(Y), TM_(X), TM_(Y), respectively. If any of them is larger than the corresponding one of the predetermined threshold values, step S112 is repeated and the correction of the position and orientation of gripper 20 and workpiece W2 is continued until all of F_(X), F_(Y), M_(X), M_(Y) satisfy Equation (6), in every control cycle (step S106).

On the other hand, if all of forces F_(X), F_(Y) and moments M_(X), M_(Y) detected by force detector 14 become less than or equal to predetermined threshold values TF_(X), TF_(Y), TM_(X), TM_(Y), respectively, and Equation (6) comes to be satisfied, it is judged that the error correction of the position and orientation of gripper 20 and workpiece W2 has been completed (step S108). When the correction of the position and orientation of gripper 20 and workpiece W2 has been completed, axis 38 of protrusion 24 of workpiece W2 held by gripper 20 is aligned with center axis 28 of fitting hole 26 of workpiece W1 fixed to table 18. Therefore, by moving gripper 20 in the fitting direction while keeping this position and orientation, protrusion 24 of workpiece W2 held by gripper 20 can be smoothly inserted into fitting hole 26 of workpiece W1 fixed to table 18, thereby completing the fitting operation (step S110).

Next, effects of the present invention will be described taking the case as an example in which workpieces W1, W2 have an orientation error, with reference to FIGS. 6A, 6B, 7A and 7B.

FIGS. 6A, 6B, 7A and 7B illustrate graphs showing a temporal change in orientation change amount of gripper 20 and moment M detected by force detector 14 both in the case where the orientation error of workpiece W2 around X- and Y-axes with respect to workpiece W1 is corrected based on moment M detected by force detector 14 as in the conventional compliance control or force control and in the case where the orientation error of workpiece W2 around X- and Y-axes with respect to workpiece W1 is corrected based on maximum value M′ of the moment detected by force detector 14 according to the present invention.

In FIGS. 6A and 6B showing the prior art, force control gain G is set to 0.03 (rad/Kgfms) in order to prevent oscillation due to vibration of workpiece W2. On the other hand, according to the present invention, an oscillation limit is higher than that in the prior art, and therefore, in FIGS. 7A and 7B, force control gain G is set to 0.09 (rad/Kgfms), i.e. three times as high as the force control gain in the case of FIGS. 6A and 6B. Also, in both cases shown in FIGS. 6A, 6B and 7A, 7B, the fitting operation is started from the state in which axis 38 of protrusion 24 of workpiece W2 held by gripper 20 and center axis 28 of fitting line 26 of workpiece W1 fixed to table 18 are misaligned with each other by 10 mrad, moment M due to the orientation error of workpiece W2 is generated after 1.3 seconds, and the orientation error is corrected after 1.5 seconds.

In FIGS. 6A, 6B showing the prior art, angular velocity command ω is determined from the magnitude of moment M detected at that time by force detector 14 in every control cycle, while in FIGS. 7A, 7B showing the present invention, the angular velocity command is determined from maximum value M′ of the moment detected by force detector 14 during the contact of the workpieces with each other. Therefore, in FIGS. 7A, 7B, after 1.7 seconds when moment M becomes maximum, the angular velocity command is calculated from this maximum value M′ and continues to be used until 2.8 seconds when moment M detected by force detector 14 becomes zero.

Thus, from FIGS. 7A and 7B showing the present invention, it can be understood that as the result of setting force control gain G at three times as large as the value for the prior art shown in FIGS. 6A and 6B, the correction of the orientation error of workpiece W2 is completed in about one third of the time required in the case shown in FIGS. 6A and 6B.

In fitting apparatus 10 according to the present invention, controller 16, in every control cycle, corrects the operation command for robot arm 12 based on maximum values F′, M′ of the force and the moment detected by force detector 14 while two workpieces W1, W2 are in contact with each other or force F0 and moment M0 detected by force detector 14 when two workpieces W1, W2 first come into contact with each other, so that the position of gripper 20 and workpiece W2 in the direction perpendicular to the fitting direction and the orientation of gripper 20 and workpiece W2 around the axis perpendicular to the fitting direction are corrected until force F and moment M detected by force detector 14 become less than or equal to predetermined threshold values TF, TM, respectively. Force F and moment M exerting on workpiece W2 held by gripper 20 are detected in every control cycle, and force F and moment M thus detected are used only for the purpose of monitoring whether force F and moment M have become less than or equal to the predetermined threshold values TF, TM, respectively. Specifically, data about force F and moment M detected by force detector 14 are not used directly for feedback control. Therefore, even if force detector 14 is accompanied by noises due to the vibration of robot arm 12 or workpiece W2, the operation of correcting the position error and the orientation error of workpiece W2 with respect to workpiece W1 is not substantially affected. Thus, force control gain G can be set to a larger value than that in the prior art. As a result, an initial error, if any, in workpieces W1, W2 or robot arm 12 can be corrected stably and more quickly than in the prior art.

Although the present invention has been described above based on the embodiments shown in the drawings, it should not be limited to those embodiments. For example, in the foregoing description, the position error is corrected based on force F exerting in the directions of the two axes (X and Y-axes in the above description) perpendicular to the fitting direction for each component, and the orientation error is corrected based on moment M exerting around the two axes (X- and Y-axes in the above description) perpendicular to the fitting direction for each component. However, the position error and the orientation error are not necessarily corrected for each component as described above. As an alternative, assuming that the resultant force of forces F_(X), F_(Y) received by workpiece W2 in the X- and Y-axis directions the instant workpieces W1 and W2 come into contact with each other is designated as FR and the direction of FR is designated as X′, velocity command υ in X′ direction may be determined from force control gain G. At the same time, assuming that the resultant moment of moments M_(X), M_(Y) around X- and Y-axes received by workpiece W2 the instant workpieces W1 and W2 come into contact with each other is designated as MR and the direction of the rotation axis of moment MR is designated as X″, angular velocity command ω around rotation axis X″ may be determined. 

1. A fitting apparatus comprising a robot arm having, at the forward end thereof, a gripper for holding a workpiece, a force detector for detecting a force and moment received by said workpiece held by said gripper, and a controller for controlling an operation of said robot arm, said gripper holding one of two workpieces to be fitted to each other and moving said workpiece in a fitting direction to be fitted to the other of said two workpieces while compliance control or force control is performed so as to correct a position and orientation of said workpiece held by said gripper based on an output of said force detector, wherein said controller includes an operation command generating unit for generating an operation command to fit said two workpieces to each other, and an operation command correcting unit for correcting the operation command generated by said operation command generating unit so as to correct the position of said gripper in a direction perpendicular to the fitting direction and the orientation of said gripper around an axis perpendicular to the fitting direction until the force and moment detected by said force detector become less than or equal to a predetermined threshold value, based on either maximum values of the force and moment detected by said force detector while said two workpieces are in contact with each other or the force and moment detected by said force detector when said two workpieces first come into contact with each other, said controller controlling the operation of said robot arm to fit said two workpieces with each other in accordance with the corrected operation command.
 2. The fitting apparatus according to claim 1, wherein said operation command correcting unit corrects the operation command so as to reduce the force and moment detected by said force detector.
 3. The fitting apparatus according to claim 2, wherein said force detector detects the force exerting in the directions along two axes perpendicular to the fitting direction and perpendicular to each other, and wherein said operation command correcting unit corrects the operation command based on the forces in the directions along the two axes detected by said force detector to thereby correct the position of said gripper in the directions perpendicular to the fitting direction.
 4. The fitting apparatus according to claim 2, wherein said force detector detects the moment around the two axes perpendicular to the fitting direction and perpendicular to each other, and wherein said operation command correcting unit corrects the operation command based on the moments around the two axes detected by said force detector to thereby correct the orientation of said gripper around the two axes perpendicular to the fitting direction.
 5. The fitting apparatus according to claim 1, wherein said force detector comprises a force sensor.
 6. The fitting apparatus according to claim 1, wherein said force detector determines the force and moment received by said workpiece, based on a current value of an actuator for driving said robot arm. 